
'
' *  NHibernate 代码模版
' 

Imports System.Collections.Generic

Namespace NCS
	''' <summary>
	'''	
	''' </summary>
	<Serializable()> _
	Public Class doChanel

		#Region "构造方法"
		Public Sub New()
			m_cname = Nothing
			m_id = 0

			m_chanel = 0
		End Sub
		#End Region


		#Region "私有变量"
		Private m_cname As String
		Private m_id As Integer
		Private m_chanel As Short

		#End Region


		#Region "公有属性"

		'''<summary>
		'''
		'''</summary>
		Public Overridable Property cname() As String
			Get
				Return m_cname
			End Get
			Set
				m_cname = value
			End Set
		End Property

		'''<summary>
		'''
		'''</summary>
		Public Overridable Property id() As Integer
			Get
				Return m_id
			End Get
			Set
				m_id = value
			End Set
		End Property

		'''<summary>
		'''
		'''</summary>
		Public Overridable Property chanel() As Short
			Get
				Return m_chanel
			End Get
			Set
				m_chanel = value
			End Set
		End Property

		#End Region

		#Region "Rewrite Equals and HashCode"
		''' <summary>
		''' 
		''' </summary>
		Public Overloads Overrides Function Equals(obj As Object) As Boolean
			If Me Is obj Then
				Return True
			End If
			If (obj Is Nothing) OrElse (obj.[GetType]() IsNot [GetType]()) Then
				Return False
			End If
			Dim castObj As doChanel = DirectCast(obj, doChanel)
			Return (castObj IsNot Nothing) AndAlso (m_id = castObj.id)
		End Function
		''' <summary>
		''' 用唯一值实现GetHashCode
		''' </summary>
		Public Overloads Overrides Function GetHashCode() As Integer
			Dim hash As Integer = 57
			hash = 27 * hash * m_id.GetHashCode()
			Return hash
		End Function
		#End Region
	End Class
End Namespace
